Adding NAT Rules

Topics on this page: The Virtual Server Rule | The DMZ Rule
[Go back]

This topic explains how to create rules for the available flavors of NAT. Also see these NAT topics:

You cannot edit existing NAT rules. To change a rule setup, delete it and add a new rule with the new settings.

The Virtual Server Rule: Allowing External Access to a LAN Computer

The Virtual Server rule flavor allows you to make a computer on your LAN, such as a Web or FTP server, available to Internet users without having to obtain a public IP address for that computer. The computer's private IP address is translated to your public IP address in all incoming and outgoing data packets.

Without a Virtual Server rule (or DMZ rule), the router prevents attempts by external computers to access your LAN computers.

The following example illustrates using the Virtual Server rule to provide external access to your web server:

Your Voyager 205 receives a packet containing a request for access to your Web server. The packet header contains the public address for your LAN as the destination IP address, and a destination port number of 80. Because you have set up a Virtual Server rule for incoming packets with destination port 80, the device recognizes the data as a request for Web server access. The device changes the packet's destination address to the private IP address of your Web server and forwards the data packet to it.

Your Web server sends data packets in response. Before the Voyager 205 forwards them on to the Internet, it changes the source IP address in the data packets from the Web server's private address to your LAN's public address. To an external Internet user then, it appears as if your Web server uses your public IP address.

You can also configure the Virtual Server rule to translate the source computer's port number to the number specified on the main NAT Configuration Page.

Follow these instructions to add a Virtual Server rule:

  1. If the NAT Rule Configuration page is not already displaying, click the NAT menu, then select NAT Virtual Server/DMZ from the NAT Options drop-down list.
  2. Click Add to display the NAT Rule - Add page.
  3. From the Rule Flavor drop-down list, select Virtual Server.

The page redisplays with only the fields that are appropriate for this NAT flavor. 

  1. Enter a rule ID.

The Rule ID determines the order in which rules are invoked (the lowest numbered rule is invoked first, and so on). In some cases, two or more rules may be defined to act on the same set of IP addresses. Be sure to assign the Rule ID so that the higher priority rules are invoked before lower-priority rules. It is recommended that you select rule IDs as multiples of 5 or 10 so that, in the future, you can insert a rule between two existing rules.

When a data packet matches a rule, the data is acted upon according to that rule and is not subjected to higher-numbered rules.

  1. Select a protocol to which this rule applies, or choose ALL.

This selection specifies which type of Internet communication will be subject to this translation rule. You can select ALL if the rule applies to all data. Or, select TCP, UDP, ICMP, or a number from 1-255 that represents the IANA-specified protocol number.

  1. In the Local Address From and Local Address To fields, type the same private IP address, or the lowest and highest addresses in a range:
  • If you type the same IP address in both fields, incoming traffic that matches the criteria you specify in steps 5 and 6 will be redirected to that IP address. 
  • If you type a range of addresses, incoming traffic will be redirected to any available computer in that range. This option would typically be used for load balancing, whereby traffic is distributed among several redundant servers to help ensure efficient network performance. 

These addresses should correspond to private addresses already in use on your network (either assigned statically to your PCs, or assigned dynamically using DHCP, as discussed in DHCP Mode).

  1. In the Destination Port From and Destination Port To fields, enter the port ID (or a range) that you expect to see on incoming packets destined for the LAN computer for which this rule is being created. 

Incoming traffic that meets this rule criteria will be redirected to the Local Port number you specify in the next field.

For example, if you grant public access to a Web server on your LAN, you would expect that incoming packets destined for that computer would contain the port number 80. This setting serves as a filter; data packets not containing this port number would not be granted access to you local computer. 

  1. If the LAN computer that you are making publicly available is configured to use a non-standard port number for the type of traffic it receives, type the non-standard port number in the Local Port field. 

This option translates the standard port number in packets destined for your LAN computer to the non-standard number you specify. For example, if your Web server uses (non-standard) port 2000, but you expect incoming data packets to refer to (standard) port 80, you would enter 2000 here and 80 in the Destination Port fields. The headers of incoming packets destined for port 80 will be modified to refer to port 2000. The packet can then be routed appropriately to the web server.

  1. Click Apply and then click close on the confirmation page to return to the NAT Enable/Disable page. 
    The new rule should display in the NAT Rule Configuration table. 
  2. Ensure that the Enable radio button is selected, and then click Apply. A page displays to confirm your changes.

The DMZ Rule: Performing Two-Way Translations

Unlike the Virtual Server flavor, the DMZ flavor performs address translations in both the outgoing and incoming directions. 

In the incoming direction, when the specified device interface receives a packet with your public IP address as the destination address, this address is translated to the private IP address of a computer on your LAN. To the external computer, it appears as if the access is being made to the public IP address, when, in fact, it is communicating with a LAN computer. 

In the outgoing direction, the private source IP address in a data packet is translated to the LAN's public IP address. To the rest of the Internet, it appears as if the data packet originated from the public IP address. 

DMZ rules can be used to provide external access to a LAN device. They do not provide the same level of security as Virtual Server rules, because Virtual Server rules can also reroute incoming packets based on the port ID. DMZ rules do not account for the port number, and therefore allow external access regardless of the destination port type specified in the incoming packet.

To add a DMZ rule, follow these instructions: (see steps 1-4 under "The Virtual Server Rule" for specific instructions corresponding to steps 1 below):

  1. Display the NAT Rule-Add Page, select DMZ as the Rule Flavor, and enter a Rule ID.
  2. In the LAN IP Address field, type the private IP address of the computer to which you are granting external access.
  3. Follow steps 8-12 under "The NAPT Rule" to submit your changes.
  4. Click Apply and then click close on the confirmation page to return to the NAT Enable/Disable page. 
    The new rule should display in the NAT Rule Configuration table. 
  5. Ensure that the Enable radio button is selected, and then click Apply. A page displays to confirm your changes.